new Vue({
    el:"#findweek",
    data:{
        placeweeks:[],
        page:"",
        show:"",

    },
    filters: {
        formatDate: function (value) {
            let date = new Date(value);
            let y = date.getFullYear();
            let MM = date.getMonth() + 1;
            MM = MM < 10 ? ('0' + MM) : MM;
            let d = date.getDate();
            d = d < 10 ? ('0' + d) : d;
            return y + '-' + MM + '-' + d ;
        }
    },
    methods:{
        //得到场地一周信息
        getPlaceWeekInfo(pageNum){
            var placeweeks;
            var pages;
            $.ajax({
                // 设置json的属性和值
                url: "/getPlaceWeekInfo",
                contentType: "application/json;charset=UTF-8",
                data: {'pageNum':pageNum},
                async:false,
                type: "get",
                success: function (data) {
                    placeweeks = data.placeApplies
                    pages = data.pages
                }
            })
            this.placeweeks = placeweeks
            this.page = pages
            this.show = '11'
        },

    },
    created(){
        this.getPlaceWeekInfo(1)
    }
})